package nature.nano.control.script.parse;

import nature.nano.component.PrimaryPipe;
import nature.nano.component.Strings;

public class InlineCommentFilter extends PrimaryPipe {
	
	public InlineCommentFilter() {
		allThrough();
	}
	
	@Override
	public void anContent(String content) {
		int split = content.indexOf("//");
		if (split == 0) {
			return;
		}
		
		if (split > 0) {
			slot(Strings.output).onContent(content.substring(0, split).trim());
		} else {
			slot(Strings.output).onContent(content);
		}
	}
	
}
